import _00GraphFuc as gf
import _000GraphBasicProblem as gb

#对于一个二分图，求匹配以及匹配的边集合
V1={'x1','x2','x3','x4','x5'}
V2={'y1','y2','y3','y4','y5'}
V=V1|V2
E={('x1','y1'),('x1','y2'),('x2','y2'),('x2','y3'),('x3','y2'),('x3','y5'),('x4','y3'),('x5','y3'),
   ('x5','y4'),('x5','y5')}
[match,Em]=gb.baiscmatch(V,E)
gf.drawgraph(E)
gf.drawgraph(Em)
tv=Em<=E
print(Em)
print(tv)